<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:71:"/var/www/dangan_new/public/../application/index/view/Borrows/index.html";i:1547548506;s:57:"/var/www/dangan_new/application/index/view/top/index.html";i:1547618726;}*/ ?>
<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<meta charset="utf-8"/>
	<title>东海航海保障中心电子档案系统</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1" name="viewport"/>
	<meta content="" name="description"/>
	<meta content="" name="author"/>
	<!-- BEGIN GLOBAL MANDATORY STYLES -->
	<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
	<link href="/static/assets/plugins/gritter/css/jquery.gritter.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/fullcalendar/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/jqvmap/jqvmap/jqvmap.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/plugins/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css"/>
	<!-- END PAGE LEVEL PLUGIN STYLES -->
	<!-- BEGIN THEME STYLES -->
	<link href="/static/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/pages/tasks.css" rel="stylesheet" type="text/css"/>
	<link href="/static/assets/css/themes/default.css" rel="stylesheet" type="text/css">
	<link href="/static/assets/css/print.css" rel="stylesheet" type="text/css" media="print"/>
	<link href="/static/assets/css/custom.css" rel="stylesheet" type="text/css"/>
	<!-- END THEME STYLES -->
	<link rel="shortcut icon" href="favicon.ico"/>
	<style>
		a:link{text-decoration:none; }  /* 指正常的未被访问过的链接*/

		a:visited{text-decoration:none; }/*指已经访问过的链接*/

		a:hover{text-decoration:none;}/*指鼠标在链接*/}

		a:active{text-decoration:none;}/* 指正在点的链接*/ 
	</style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<div class="header navbar navbar-fixed-top">
	<!-- BEGIN TOP NAVIGATION BAR -->
	<div class="header-inner">
		<!-- BEGIN LOGO -->
		<a class="navbar-brand" href="index.html" style="margin-top: -8px;">
			<img src="/static/assets/img/logo.png" alt="logo" class="img-responsive"/ width="30">
		</a>
		<!-- END LOGO -->
		<!-- BEGIN RESPONSIVE MENU TOGGLER -->
		<div class="hor-menu hidden-sm hidden-xs">
			<ul class="nav navbar-nav">
				<!-- <li class="classic-menu-dropdown active">
					<a href="index.html">
						 Dashboard
						<span class="selected">
						</span>
					</a>
				</li> -->
				<li class="mega-menu-dropdown">
					<a href="/" data-hover="dropdown" data-close-others="true" href="" class="dropdown-toggle">
						我的工作台 <!-- <i class="fa fa-angle-down"></i> -->
					</a>

				</li>
				<li>
					<a data-hover="dropdown" data-close-others="true" href="<?php echo url('index/Search/index'); ?>" class="dropdown-toggle">
						档案查询 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
				</li>
				<li class="mega-menu-dropdown mega-menu-full open">
					<a data-hover="dropdown" data-close-others="true" href="<?php echo url('index/Prearc/index'); ?>?cate_id=-1" class="dropdown-toggle">
						档案管理 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
					<ul class="dropdown-menu">
						<li>
						</li>
					</ul>
				</li>
				<li class="mega-menu-dropdown mega-menu-full">
					<a data-hover="dropdown" data-close-others="true" href="<?php echo url('index/Message/index'); ?>?cate_id=-1" class="dropdown-toggle">
						消息管理 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
					<ul class="dropdown-menu">
						<li>
						</li>
					</ul>
				</li>
				<li class="mega-menu-dropdown mega-menu-full">
					<a data-hover="dropdown" data-close-others="true" href="<?php echo url('index/Suggest/index'); ?>" class="dropdown-toggle">
						意见反馈 <!-- <i class="fa fa-angle-down"></i> -->
					</a>
					<ul class="dropdown-menu">
						<li>
						</li>
					</ul>
				</li>
				<!-- <li>
					<span class="hor-menu-search-form-toggler">
						 &nbsp;
					</span>
					<div class="search-form">
						<form class="form-search">
							<div class="input-group">
								<input type="text" placeholder="Search..." class="form-control">
								<div class="input-group-btn">
									<button type="button" class="btn"></button>
								</div>
							</div>
						</form>
					</div>
				</li> -->
			</ul>
		</div>

		<a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
			<img src="/static/assets/img/menu-toggler.png" alt=""/>
		</a>
		<!-- END RESPONSIVE MENU TOGGLER -->
		<!-- BEGIN TOP NAVIGATION MENU -->
		
		<ul class="nav navbar-nav pull-right">
			<!-- BEGIN NOTIFICATION DROPDOWN -->
			<li class="dropdown" id="header_notification_bar" style="display: none;">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<i class="fa fa-warning"></i>
					<span id="notnum">
						 
					</span>
				</a>
				<ul class="dropdown-menu extended notification">
					<li>
						<p>
							 <span id="noticenum"></span>
						</p>
					</li>
					<!-- <li id="papa"  style="overflow: hidden;max-height: 200px;"> -->
					<li id=""  style="overflow: hidden;max-height: 200px;">
						<!-- <i class="fa fa-bell-o"></i> -->

					<li>
						
					</li>
					<li class="external">
						<a href="<?php echo url('index/Inbox/checknotice'); ?>">
							 查看更多 <i class="m-icon-swapright"></i>
						</a>
					</li>
				</ul>
			</li>
			<!-- END NOTIFICATION DROPDOWN -->
			<!-- BEGIN INBOX DROPDOWN -->
			<li class="dropdown" id="header_inbox_bar">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<i class="fa fa-envelope"></i>
					<span id="mailnum" >

					</span>
				</a>
				<ul class="dropdown-menu extended inbox" style="">
					<li>
						<p>
							 <span id="messagenum"></span>

						</p>
					</li>

					<li id="baba"  style="overflow: hidden;max-height: 200px;">
						
					</li>
					<li class="external">
						<a href="<?php echo url('index/Message/index'); ?>">
							 查看更多 <i class="m-icon-swapright"></i>
						</a>
						
					</li>
				</ul>
			</li>
			<script>
				
			</script>
			<!-- END INBOX DROPDOWN -->
			<!-- BEGIN TODO DROPDOWN -->

			<!-- END TODO DROPDOWN -->
			<!-- BEGIN USER LOGIN DROPDOWN -->
			<li class="dropdown user">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<!-- <img alt="" src="/static/assets/img/avatar1_small.jpg"/> -->
					<span class="username">
						<?php echo $_SESSION['think']['username'][0]['user_name']; ?>
					</span>
					<i class="fa fa-angle-down"></i>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="<?php echo url('index/user/index'); ?>">
							<i class="fa fa-user"></i> 个人中心
						</a>
					</li>
					
					
					<li class="divider">
					</li>
					<li>
						<a href="javascript:;" id="trigger_fullscreen">
							<i class="fa fa-arrows"></i> 全屏
						</a>
					</li>
					
					<li>
						<a href="<?php echo url('index/logout/index'); ?>">
							<i class="fa fa-key"></i> 注销
						</a>
					</li>
				</ul>
			</li>
			<!-- END USER LOGIN DROPDOWN -->
		</ul>

		<!-- END TOP NAVIGATION MENU -->
	</div>
	<!-- END TOP NAVIGATION BAR -->
</div>
<!-- END HEADER -->
<div class="clearfix">
</div>

<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<div class="page-sidebar-wrapper">
		<div class="page-sidebar navbar-collapse collapse">
			<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
			<!-- BEGIN SIDEBAR MENU -->
			<ul class="page-sidebar-menu" data-auto-scroll="true" data-slide-speed="200">
				<li class="sidebar-toggler-wrapper">
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
					<div class="sidebar-toggler hidden-phone">
					</div>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
				</li>
				<!-- {if  $node[0]['menu_name'] == 'level1'}  -->
			
				<li class="prearc">
					<a href="<?php echo url('index/prearc/index'); ?>?cate_id=-1">
						<i class="fa fa-shopping-cart"></i>
						<span class="title">
							立卷
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
				<li class="file">
					<a href="<?php echo url('index/file/index'); ?>">
						<i class="fa fa-puzzle-piece"></i>
						<span class="title">
							归档
						</span>
						<span class="arrow ">
						</span>
					</a>

				</li>
				<li class="arc">
					<a href="<?php echo url('index/arc/index'); ?>?cate_id=-2">
						<i class="fa fa-gift"></i>
						<span class="title">
							档案库
						</span>
						<span class="arrow">
						</span>
					</a>
				</li>
					<li class="compilation">
					<a href="<?php echo url('index/compilation/index'); ?>?cate_id=-3">
						<i class="fa fa-bookmark-o"></i>
						<span class="title">
							编研库
						</span>
						<span class="arrow ">
						</span>
					</a>

				</li>
				<li class="storage">
					<a href="<?php echo url('index/storage/index'); ?>">
						<i class="fa fa-cogs"></i>
						<span class="title">
							库房管理
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
		
				
				
				
				
				<li class="borrow">
					<!--<a href="javascript:void(0);" onclick="sorry()">-->
					 <a href="<?php echo url('index/borrows/index'); ?>">
						<i class="fa fa-table"></i>
						<span class="title">
							借阅审批
						</span>
						<span class="arrow ">
						</span>
					</a>

				</li>
				
				<li class="destroy">
					<a href="<?php echo url('index/destroy/index'); ?>">
						<i class="fa fa-envelope-o"></i>
						<span class="title">
							鉴定和销毁
						</span>
						<span class="arrow ">
						</span>
					</a>


				</li>
			
				<li class="count">
					<a href="<?php echo url('index/count/index'); ?>">
						<i class="fa fa-bar-chart-o"></i>
						<span class="title">
							统计报表
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
				
				<li class="manage">
					<a href="<?php echo url('index/Manage/index'); ?>">
						<i class="fa fa-bar-chart-o"></i>
						<span class="title">
							账户管理
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
				
				<!-- <li class="pics">
					<a href="<?php echo url('index/Pics/index'); ?>">
						<i class="fa fa-bar-chart-o"></i>
						<span class="title">
							图片和视频
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li> -->
				
				

				<!-- <li class="power">
					<a href="<?php echo url('index/Power/index'); ?>">
						<i class="fa fa-bar-chart-o"></i>
						<span class="title">
							权限管理
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li> -->
				
				<li class="role">
					<a href="<?php echo url('index/Role/index'); ?>">
						<i class="fa fa-bar-chart-o"></i>
						<span class="title">
							角色权限
						</span>
						<span class="arrow ">
						</span>
					</a>
				</li>
			</ul>
			<!-- END SIDEBAR MENU -->
		</div>
	</div>
	<div class="modal fade" id="model1" tabindex="-1" role="model1" aria-hidden="true" style="display: none;">

		<!-- /.modal-dialog -->
	</div>
	<script src="/static/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<script src="/static/assets/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.cokie.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script src="/static/assets/plugins/jqvmap/jqvmap/jquery.vmap.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.russia.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.world.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.europe.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.germany.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/maps/jquery.vmap.usa.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jqvmap/jqvmap/data/jquery.vmap.sampledata.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/flot/jquery.flot.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/flot/jquery.flot.resize.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/flot/jquery.flot.categories.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.pulsate.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap-daterangepicker/moment.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/bootstrap-daterangepicker/daterangepicker.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/gritter/js/jquery.gritter.js" type="text/javascript"></script>
	<!-- IMPORTANT! fullcalendar depends on jquery-ui-1.10.3.custom.min.js for drag & drop support -->
	<script src="/static/assets/plugins/fullcalendar/fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery-easy-pie-chart/jquery.easy-pie-chart.js" type="text/javascript"></script>
	<script src="/static/assets/plugins/jquery.sparkline.min.js" type="text/javascript"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<!-- <script src="/static/assets/scripts/core/app.js" type="text/javascript"></script> -->
	<!-- <script src="/static/assets/scripts/custom/index.js" type="text/javascript"></script> -->
	<script src="/static/assets/scripts/custom/tasks.js" type="text/javascript"></script>

<!-- END PAGE LEVEL SCRIPTS -->


<script type="text/javascript">
var DDSPEED = 10;
var DDTIMER = 15;
var OFFSET = -2;
var ZINT = 100;
function ddMenu(id,d){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearInterval(c.timer);
 if(d == 1){
  clearTimeout(h.timer);
  c.style.display = 'block';
  if(c.maxh && c.maxh <= c.offsetHeight){return}
  else if(!c.maxh){
   c.style.left = (h.offsetWidth + OFFSET) + 'px';
   c.style.height = 'auto';
   c.maxh = c.offsetHeight;
   c.style.height = '0px';
  }
  ZINT = ZINT + 1;
  c.style.zIndex = ZINT;
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }else{
  h.timer = setTimeout(function(){ddCollapse(c)},50);
 }
}
function ddCollapse(c){
 c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}
function cancelHide(id){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearTimeout(h.timer);
 clearInterval(c.timer);
 if(c.offsetHeight < c.maxh){
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }
}
function ddSlide(c,d){
 var currh = c.offsetHeight;
 var dist;
 if(d == 1){
  dist = Math.round((c.maxh - currh) / DDSPEED);
 }else{
  dist = Math.round(currh / DDSPEED);
 }
 if(dist <= 1 && d == 1){
  dist = 1;
 }
 c.style.height = currh + (dist * d) + 'px';
 c.style.opacity = currh / c.maxh;
 c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
 if(currh > (c.maxh - 2) && d == 1){
  clearInterval(c.timer);
 }else if(dist < 1 && d != 1){
  clearInterval(c.timer);
  c.style.display = 'none';
 }
}
</script>
<!-- END JAVASCRIPTS -->
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery(document).ready(function() {    
   // App.init(); // initlayout and core plugins
   // Index.init();
   // Index.initJQVMAP(); // init index page's custom scripts
   // Index.initCalendar(); // init index page's custom scripts
   // Index.initCharts(); // init index page's custom scripts
   // Index.initChat();
   // Index.initMiniCharts();
   // Index.initDashboardDaterange();
   // Index.initIntro();
   // Tasks.initDashboardWidget();
});
</script>
<script type="text/javascript">
var DDSPEED = 10;
var DDTIMER = 15;
var OFFSET = -2;
var ZINT = 100;
function ddMenu(id,d){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearInterval(c.timer);
 if(d == 1){
  clearTimeout(h.timer);
  c.style.display = 'block';
  if(c.maxh && c.maxh <= c.offsetHeight){return}
  else if(!c.maxh){
   c.style.left = (h.offsetWidth + OFFSET) + 'px';
   c.style.height = 'auto';
   c.maxh = c.offsetHeight;
   c.style.height = '0px';
  }
  ZINT = ZINT + 1;
  c.style.zIndex = ZINT;
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }else{
  h.timer = setTimeout(function(){ddCollapse(c)},50);
 }
}
function ddCollapse(c){
 c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER);
}
function cancelHide(id){
 var h = document.getElementById(id + '-ddheader');
 var c = document.getElementById(id + '-ddcontent');
 clearTimeout(h.timer);
 clearInterval(c.timer);
 if(c.offsetHeight < c.maxh){
  c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER);
 }
}
function ddSlide(c,d){
 var currh = c.offsetHeight;
 var dist;
 if(d == 1){
  dist = Math.round((c.maxh - currh) / DDSPEED);
 }else{
  dist = Math.round(currh / DDSPEED);
 }
 if(dist <= 1 && d == 1){
  dist = 1;
 }
 c.style.height = currh + (dist * d) + 'px';
 c.style.opacity = currh / c.maxh;
 c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
 if(currh > (c.maxh - 2) && d == 1){
  clearInterval(c.timer);
 }else if(dist < 1 && d != 1){
  clearInterval(c.timer);
  c.style.display = 'none';
 }
}
</script>
<!-- END JAVASCRIPTS -->

</body>
<!-- END BODY -->
</html>
<script>
	$(function(){
        	setInterval(getNew,60000);
        	// getNew();
    });

        	var id = <?php echo json_encode($_SESSION['think']['username'][0]['user_id']);?>;
        function getNew(){
            $.ajax({
                type:"POST",
                url:"<?php echo url('index/Top/Message'); ?>",
                data:{id:id}, 
                dataType:'json',
                success:function(data){
                	if (data.length == 0) {
                		// 去除class
                		// $('#mailnum').removeClass();
                		$('#messagenum').html('暂无公告');
                	}else{
                		$('#mailnum').addClass('badge');
                		$('#mailnum').html(data.length);
                		$('#messagenum').html('你有'+data.length+'条公告。');
                		$('#baba').empty();
                		for(var i = 0; i <data.length ; i++){
// 
                			$('#baba').append('<a href="<?php echo url("index/inbox/check"); ?>?id='+data[i]['mail_id']+'"><span class="message">'+data[i]['mail_title']+'</span></a>');
                			// $('#baba').css('max-height','200px');
                			// console.log(data[i]['mail_id']);
                			// $('<span>'+$data[i]['mail_title']+'</span>').appendTo('.baba');
                		}
                		
						$(".message").each(function() {
					    if ($(this).text().length > 15) {
					        $(this).html($(this).text().replace(/\s+/g, "").substr(0, 15) + "...")
					    }
					})
                		
                	}

                },
                //Ajax请求超时，继续查询
                error:function(XMLHttpRequest,textStatus,errorThrown){
                   
                }
 
            });
        }
 
    // 
</script>

	<!-- // 查询未读公告 -->
<!-- <script>
	$(function(){
		setInterval(getNotice,5000);
		// getNotice();
    });
        var id = <?php echo json_encode($_SESSION['think']['username'][0]['user_id']);?>;
        function getNotice(){
            $.ajax({
                type:"POST",
                url:"<?php echo url('index/Top/notices'); ?>",
                data:{id:id}, 
                dataType:'json',
                success:function(res){
                	if (res.length == 0 ) {
                		// 去除class
                		// $('#notnum').removeClass();
                		$('#noticenum').html('暂无公告');
                	}else{
                		$('#notnum').addClass('badge');
                		$('#notnum').html(res.length);
                		$('#noticenum').html('你有'+res.length+'条公告。');
                		$('#papa').empty();
                		for(var i = 0; i <res.length ; i++){
// 
                			$('#papa').append('<a href="<?php echo url("index/inbox/check"); ?>?id='+res[i]['mail_id']+'"><span class="notice">'+res[i]['mail_title']+'</span></a>');
                			// console.log(data[i]['mail_id']);
                			// $('<span>'+$data[i]['mail_title']+'</span>').appendTo('.baba');
                		}
                		
						$(".notice").each(function() {
					    if ($(this).text().length > 15) {
					        $(this).html($(this).text().replace(/\s+/g, "").substr(0, 15) + "...")
					    }
					})
                		
                	}

                },
                //Ajax请求超时，继续查询
                error:function(XMLHttpRequest,textStatus,errorThrown){
                   
                }
 
            });
        }
 
</script> -->

<!-- <script>
	$(function(){
		$('.inbox').click(function(){
		$('.inbox').addClass("active");
	});
	});
</script> -->

<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content" style="min-height: 874px !important;">
        <!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
        <div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                        <h4 class="modal-title">Modal title</h4>
                    </div>
                    <div class="modal-body">
                        Widget settings form goes here
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn blue">Save changes</button>
                        <button type="button" class="btn default" data-dismiss="modal">Close</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
        <!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
        <!-- BEGIN STYLE CUSTOMIZER -->
        <div class="theme-panel hidden-xs hidden-sm">
            <!-- <div class="toggler">
            </div> -->
            <div class="toggler-close">
            </div>
            <div class="theme-options">
                <div class="theme-option theme-colors clearfix">
						<span>
							 THEME COLOR
						</span>
                    <ul>
                        <li class="color-black current color-default" data-style="default">
                        </li>
                        <li class="color-blue" data-style="blue">
                        </li>
                        <li class="color-brown" data-style="brown">
                        </li>
                        <li class="color-purple" data-style="purple">
                        </li>
                        <li class="color-grey" data-style="grey">
                        </li>
                        <li class="color-white color-light" data-style="light">
                        </li>
                    </ul>
                </div>
                <div class="theme-option">
						<span>
							 Layout
						</span>
                    <select class="layout-option form-control input-small">
                        <option value="fluid" selected="selected">Fluid</option>
                        <option value="boxed">Boxed</option>
                    </select>
                </div>
                <div class="theme-option">
						<span>
							 Header
						</span>
                    <select class="header-option form-control input-small">
                        <option value="fixed" selected="selected">Fixed</option>
                        <option value="default">Default</option>
                    </select>
                </div>
                <div class="theme-option">
						<span>
							 Sidebar
						</span>
                    <select class="sidebar-option form-control input-small">
                        <option value="fixed">Fixed</option>
                        <option value="default" selected="selected">Default</option>
                    </select>
                </div>
                <div class="theme-option">
						<span>
							 Sidebar Position
						</span>
                    <select class="sidebar-pos-option form-control input-small">
                        <option value="left" selected="selected">Left</option>
                        <option value="right">Right</option>
                    </select>
                </div>
                <div class="theme-option">
						<span>
							 Footer
						</span>
                    <select class="footer-option form-control input-small">
                        <option value="fixed">Fixed</option>
                        <option value="default" selected="selected">Default</option>
                    </select>
                </div>
            </div>
        </div>
        <!-- END STYLE CUSTOMIZER -->
        <!-- BEGIN PAGE HEADER-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title">
                    借阅<small>整理现有文档，审批后存放到文件库</small>
                </h3>

                <!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <form class="form-inline">
            <div class="form-group">
                <label class="sr-only" for="exampleInputEmail3"></label>
                <input type="text" class="form-control" id="search" placeholder="search">
            </div>
            <button type="submit" class="btn btn-success">搜索</button>
        </form>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <!-- Begin: life time stats -->
                <div class="portlet">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-gift"></i>阶段：
                        </div>
                        <a href="<?php echo url('index/Borrows/index'); ?>">全部（<?php echo $q_num; ?>）</a>
                        <a href="<?php echo url('index/Borrows/index',['type'=>1]); ?>">申请（<?php echo $sq_num; ?>）</a>
                        <a href="<?php echo url('index/Borrows/index',['type'=>2]); ?>">通过（<?php echo $sh_num; ?>）</a>
                        <a href="<?php echo url('index/Borrows/index',['type'=>3]); ?>">拒绝（<?php echo $dh_num; ?>）</a>

                        <div class="actions">
                            <div class="btn-group">
                                <a class="btn blue yellow-stripe getmodal" href="<?php echo url('index/Borrows/addFile'); ?>" data-toggle="dropdown">
                                    <i class="fa fa-plus"></i> 新建
                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="portlet-body">
                        <div class="table-container">
                            <div class="table-actions-wrapper">
									<span>
									</span>
                                <select class="table-group-action-input form-control input-inline input-small input-sm">
                                    <option value="">Select...</option>
                                    <option value="publish">Publish</option>
                                    <option value="unpublished">Un-publish</option>
                                    <option value="delete">Delete</option>
                                </select>
                                <button class="btn btn-sm yellow table-group-action-submit"><i class="fa fa-check"></i> Submit</button>
                            </div>
                            <table class="table table-striped table-bordered table-hover" id="datatable_products">
                                <thead>
                                <tr role="row" class="heading">
                                    <th width="1%">
                                        <input type="checkbox" class="group-checkable">
                                    </th>
                                    <th width="2%">
                                        #
                                    </th>
                                    <th width="10%">
                                        文档
                                    </th>
                                    <th width="10%">
                                        借阅方式
                                    </th>
                                    <th width="10%">
                                        审核人
                                    </th>
                                    <th width="15%">
                                        创建人
                                    </th>
                                    <th width="15%">
                                        当前步骤
                                    </th>
                                    <th width="15%">
                                        上一步骤
                                    </th>
                                </tr>
                                <?php if(is_array($in_data) || $in_data instanceof \think\Collection || $in_data instanceof \think\Paginator): if( count($in_data)==0 ) : echo "" ;else: foreach($in_data as $key=>$nid): ?>
                                <tr role="row" class="filter">
                                    <td>
                                        <input type="checkbox" class="group-checkable">
                                    </td>
                                    <td>
                                        <?php echo $key+1; ?>
                                    </td>
                                    <td>
                                        <?php if($nid['cate_type'] == 3): ?>
                                        <a  class="getmodal" data-id="<?php echo $nid['arc_id']; ?>" href="<?php echo url('index/Compilation/onRead'); ?>">
                                            <?php elseif($nid['cate_type'] == 2): ?>
                                            <a  class="getmodal" data-id="<?php echo $nid['arc_id']; ?>" href="<?php echo url('index/Arc/onRead'); ?>">
                                                <?php else: ?>
                                                <a  class="getmodal" data-id="<?php echo $nid['arc_id']; ?>" href="<?php echo url('index/Prearc/onRead'); ?>">
                                                <?php endif; switch($nid['arc_type']): case "docx": ?><i class="fa fa-file-word-o" style="color: #5C6BC0;font-size: 1.33333333em;line-height: .75em"></i><?php break; case "xlsx": ?><i class="fa fa-file-excel-o" style="color: #43A047;font-size: 1.33333333em;line-height: .75em"></i><?php break; case "txt": ?><i class="fa fa-file-text-o" style="color: #BDBDBD;font-size: 1.33333333em;line-height: .75em"></i><?php break; case "pptx": ?><i class="fa fa-file-powerpoint-o" style="color: #FF6E40;font-size: 1.33333333em;line-height: .75em"></i><?php break; case "html": ?><i class="fa fa-file-code-o" style="color: #BDBDBD;font-size: 1.33333333em;line-height: .75em"></i><?php break; case "doc": ?><i class="fa fa-file-word-o" style="color: #5C6BC0;font-size: 1.33333333em;line-height: .75em"></i><?php break; case "xls": ?><i class="fa fa-file-excel-o" style="color: #43A047;font-size: 1.33333333em;line-height: .75em"></i><?php break; default: ?><i class="fa fa-file-code-o" style="color: #BDBDBD;font-size: 1.33333333em;line-height: .75em"></i>
                                                    <?php endswitch; ?>

                                        <?php echo $nid['arc_name']; ?>.<?php echo $nid['arc_type']; switch($nid['audit_status']): case "0": ?><span class="label label-sm label-info">初始</span><?php break; case "1": ?><span class="label label-sm label-primary " >待归档</span><?php break; case "2": ?><span  class="label label-sm label-success " >已归档</span><?php break; case "3": ?><span class="label label-sm label-danger "  >已打回</span><?php break; endswitch; ?>
                                            </a>
                                    </td>
                                    <td>
                                        <?php switch($nid['bor_type']): case "1": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">在线查看</a><?php break; case "2": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">有水印打印</a><?php break; case "3": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">无水印打印</a><?php break; case "4": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">下载PDF版</a><?php break; case "5": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">下载原始文件</a><?php break; case "6": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">查看原件</a><?php break; case "7": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">借用复印件</a><?php break; case "8": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">领用复印件</a><?php break; case "9": ?><a  class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/showFile'); ?>">借用原件</a><?php break; endswitch; ?>
                                    </td>
                                    <td>
                                        <?php echo $_SESSION['think']['user_data'][$nid['update_user_id']]['user_name']; ?>
                                    </td>
                                    <td>
                                        <?php echo $_SESSION['think']['user_data'][$nid['create_user_id']]['user_name']; ?>
                                    </td>
                                    <td>
                                        <a class="getmodal" data-id="<?php echo $nid['bor_id']; ?>" href="<?php echo url('index/Borrows/auditFile'); ?>">
                                        <?php switch($nid['bor_status']): case "1": ?>申请中<?php break; case "2": ?>审核通过<?php break; case "3": ?>打回<?php break; endswitch; ?>
                                        </a>
                                    </td>
                                    <td>
                                        <?php switch($nid['bor_status']): case "1": ?>提交审核<?php break; case "2": ?>审核通过<?php break; case "3": ?>打回<?php break; endswitch; ?>
                                    </td>
                                </tr>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!-- End: life time stats -->
            </div>
        </div>

        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<div class="footer">
    <div class="footer-inner">
        2018 &copy; 仁聚科技
    </div>
    <div class="footer-tools">
		<span class="go-top">
			<i class="fa fa-angle-up"></i>
		</span>
    </div>
</div>
<script src="/static/assets/plugins/jstree/dist/jstree.min.js"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script src="/static/assets/scripts/custom/ui-tree.js"></script>
<script src="/static/assets/scripts/core/app.js"></script>
<link rel="stylesheet" type="text/css" href="/static/assets/plugins/jstree/dist/themes/default/style.min.css"/>
<script src="/static/assets/scripts/core/dt.js"></script>
</body>
<script>
    dt().getModals();
    $('.path').click(function () {
        var id = $(this).attr('data-id');
        $.ajax({
            url:'<?php echo url('index/Borrows/setCateId'); ?>',
            data:{cate_id:id},
            type:'post',
            dataType:'json',
            success:function (e) {
                window.location.href = '<?php echo url('index/Borrows/index'); ?>';
            }
        });
    });
</script>
<script>
        $(function(){
            $('.borrow').addClass("active");
        });
</script>
</html>

<!-- 查询未读邮件 -->
